home *** CD-ROM | disk | FTP | other *** search
/ Programming in Microsoft Windows with C# / Programacion en Microsoft Windows con C#.iso / Codigo / Barras de herramientas y barras de estado / StatusBarAndAutoScroll / StatusBarAndAutoScroll.cs next >
Encoding:
Text File  |  2002-06-26  |  1.1 KB  |  39 lines

  1. //-----------------------------------------------------
  2. // StatusBarAndAutoScroll.cs ⌐ 2001 by Charles Petzold
  3. //-----------------------------------------------------
  4. using System;
  5. using System.Drawing;
  6. using System.Windows.Forms;
  7.  
  8. class StatusBarAndAutoScroll: Form
  9. {
  10.      public static void Main()
  11.      {
  12.           Application.Run(new StatusBarAndAutoScroll());
  13.      }
  14.      public StatusBarAndAutoScroll()
  15.      {
  16.           Text = "Barra de estado y autodesplazamiento";
  17.           AutoScroll = true;
  18.  
  19.                // Crea la barra de estado.
  20.  
  21.           StatusBar sb = new StatusBar();
  22.           sb.Parent = this;
  23.           sb.Text = "Mi primer texto en la barra de estado";
  24.  
  25.                // Crea etiquetas como controles secundarios del formulario.
  26.  
  27.           Label label = new Label();
  28.           label.Parent = this;
  29.           label.Text = "Superior izquierda";
  30.           label.Location = new Point(0, 0);
  31.  
  32.           label = new Label();
  33.           label.Parent = this;
  34.           label.Text = "Inferior derecha";
  35.           label.Location = new Point(250, 250);
  36.           label.AutoSize = true;
  37.      }
  38. }
  39.